int diagonalSum(int** mat, int matSize, int* matColSize)
{
    int left=0;
    int right=matSize-1;
    if(matSize == 1 && matSize == 1)
        { return mat[0][0]; }

    int sum=0;
    while(left < matSize && right >= 0)
    {
        sum+=(mat[left][left]+mat[left][right]);
        ++left;
        --right;
    }
    if(matSize%2 == 1)
        { sum-= mat[matSize/2][matSize/2]; }

    return sum;
}

